OutcomeRaise

class OutcomeRaise<E>(raise: Raise<Any?>) : Raise<E> (source)

Emulation of context receivers, when they're released this can be replaced by context receiver based code in Arrow itself.

We guarantee that the wrapped Any? will only result in E or Absent. Exposing this as Raise<E> gives natural interoperability with Raise<E> DSLs (Either).

Constructors

Link copied to clipboard
constructor(raise: Raise<Any?>)

Functions

Link copied to clipboard
open suspend fun <OtherError, A> attempt(f: suspend EffectScope<OtherError>.() -> A): Effect<OtherError, A>
Link copied to clipboard
fun <A> Outcome<E, A>.bind(): A
fun <A> Option<A>.bind(): A
open fun <A> Either<E, A>.bind(): A
open fun <A> Validated<E, A>.bind(): A
open suspend fun <A> EagerEffect<E, A>.bind(): A
open suspend fun <A> Effect<E, A>.bind(): A
open fun <A> EagerEffect<E, A>.bind(): A
open suspend fun <A> suspend Raise<E>.() -> A.bind(): A
Link copied to clipboard
open fun <A> NonEmptyList<Either<E, A>>.bindAll(): NonEmptyList<A>
open fun <A> NonEmptySet<Either<E, A>>.bindAll(): NonEmptySet<A>
open fun <A> Iterable<Either<E, A>>.bindAll(): List<A>
open fun <K, A> Map<K, Either<E, A>>.bindAll(): Map<K, A>
Link copied to clipboard
open infix suspend fun <OtherError, A> Effect<OtherError, A>.catch(recover: suspend Raise<E>.(otherError: OtherError) -> A): A
Link copied to clipboard
fun ensure(condition: Boolean)
Link copied to clipboard
fun <A : Any> ensureNotNull(value: A?): A
Link copied to clipboard
open operator fun <A> EagerEffect<E, A>.invoke(): A
open suspend operator fun <A> suspend Raise<E>.() -> A.invoke(): A
Link copied to clipboard
open override fun raise(r: E): Nothing
Link copied to clipboard
open fun <A> shift(r: E): A